import http from '@/utils/http.js';
const guest = {
	/*
	 * 方法说明: 示例请求方法
	 * author: gaomingzhe
	 * description: 
	 * @param {}   
	 * @return 
	 * @createTime: 2021-12-5 2:52:38 ?F10: PM?
	 */
	//政要通 - 背景、咨询电话
	async getGuestBgCover({
		commit
	}, data) {
		let params = data
		const res = await uni.$request('/api/index/customer_bg_cover', params)
		if (res.errno != 0) uni.$toast('请求失败！')
		return res.data
	},
	//政要通 - 页面信息
	async getGuestdetail({
		commit
	}, data) {
	
		const res = await uni.$postRequest('/api/Guest/get_detail')
		console.log(res)
		if (res.errno != 0) uni.$toast('请求失败！')
		return res.data
	},
	//政要通 - 下单
	//返回结果	// openid: "ohywC5kNGsGrMBVuuYD9qKd5apm0"
		// order_id: "456"
		// session_key: "/lRIGNGBa5QqIKaLPVK5BA=="
	async guestApplyOrder({
		commit
	}, data) {
		let params = data
		const res = await uni.$postRequest('/api/apply_order/buildorder', params)
		console.log(res)
		if (res.errno != 0) uni.$toast('请求失败！')
		return res.data
	},
	//政要通 - 价格 政要通 - 贵宾厅
	async guestDetailSome({
		commit
	}, data) {
		let params = data
		const res = await uni.$getRequest('/api/guest/get_detail_some', params)
		console.log(res)
		if (res.errno != 0) uni.$toast('请求失败！')
		return res.data
	},
};

export default guest;